package com.huashi.dealer.modular.business.balance.param;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * API打款单响应参数
 *
 * @author 谭陈强
 * @since 2025-07-30
 */
@Data
@Schema(description = "API打款单响应参数")
public class BalanceResponseParam {

    @Schema(description = "余额")
    private BigDecimal balance;

    @Schema(description = "总余额")
    private BigDecimal balanceAll;

    @Schema(description = "积分")
    private Integer points;

    @Schema(description = "支付金额")
    private BigDecimal payMoney;

    @Schema(description = "支出金额")
    private BigDecimal expendMoney;

    @Schema(description = "销售金额")
    private BigDecimal salesMoney;

    @Schema(description = "等级ID")
    private Long gradeId;

    @Schema(description = "等级名称")
    private String gradeName;

    @Schema(description = "余额日志列表")
    private List<BalanceLogInfo> balanceLogList;

    @Schema(description = "打款单列表")
    private List<BalanceApplyInfo> balanceApplyList;

    @Schema(description = "余额日志详情")
    private BalanceLogInfo balanceLogDetail;

    @Schema(description = "打款单详情")
    private BalanceApplyInfo balanceApplyDetail;

    @Schema(description = "总数")
    private Long total;

    @Schema(description = "当前页")
    private Integer currentPage;

    @Schema(description = "每页数量")
    private Integer perPage;

    @Schema(description = "最后页")
    private Integer lastPage;

    @Data
    @Schema(description = "余额日志信息")
    public static class BalanceLogInfo {
        @Schema(description = "日志ID")
        private Long logId;

        @Schema(description = "用户ID")
        private Long userId;

        @Schema(description = "场景信息")
        private SceneInfo scene;

        @Schema(description = "金额")
        private BigDecimal money;

        @Schema(description = "描述")
        private String describe;

        @Schema(description = "备注")
        private String remark;

        @Schema(description = "创建时间")
        private LocalDateTime createTime;

        @Data
        @Schema(description = "场景信息")
        public static class SceneInfo {
            @Schema(description = "场景文本")
            private String text;

            @Schema(description = "场景值")
            private Integer value;
        }
    }

    @Data
    @Schema(description = "打款单信息")
    public static class BalanceApplyInfo {
        @Schema(description = "申请ID")
        private Long applyId;

        @Schema(description = "用户ID")
        private Long userId;

        @Schema(description = "申请金额")
        private BigDecimal applyMoney;

        @Schema(description = "申请状态：10待审核，20已通过，30已拒绝，40已取消")
        private Integer applyStatus;

        @Schema(description = "申请类型：10打款申请，20提现申请")
        private Integer applyType;

        @Schema(description = "申请描述")
        private String applyDesc;

        @Schema(description = "申请备注")
        private String applyRemark;

        @Schema(description = "审核状态：10待审核，20已通过，30已拒绝")
        private Integer auditStatus;

        @Schema(description = "审核备注")
        private String auditRemark;

        @Schema(description = "审核时间")
        private LocalDateTime auditTime;

        @Schema(description = "审核人ID")
        private Long auditorId;

        @Schema(description = "审核人姓名")
        private String auditorName;

        @Schema(description = "银行名称")
        private String bankName;

        @Schema(description = "银行账号")
        private String bankAccount;

        @Schema(description = "开户名")
        private String accountName;

        @Schema(description = "图片列表")
        private List<String> images;

        @Schema(description = "创建时间")
        private LocalDateTime createTime;

        @Schema(description = "更新时间")
        private LocalDateTime updateTime;
    }
} 